package web

import (
	"gm/app/model/model"
)


type Play_active_manage struct {
	ID        int    `json:"id" gorm:"index"`
	Cname  string `json:"cname"`
	Uname  string
}

type Out struct {
	Mess  interface{}
	Cname  string `json:"cname"`
	Uname  string
}

type WalletServiceFace interface {
	Socket(id int) (Out, error)
}

type WalletService struct {


}


func  (this *WalletService) Socket(id int) (Out, error) {
		var user []*Play_active_manage
		err := model.DB.Select("id, cname,uname").Where("id = ? AND cid = ? ", id, 157).Find(&user).Error
		if err != nil {
			return Out{}, err
		}

	var result = Out{}
	result.Mess = user
	result.Cname = "测试大厅"
	result.Uname = "测试姓名"
	return result, nil
}




